<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./jq-3.6.0.js"></script>
</head>

<body>
    <div class="box">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
    </div>
</body>
<script>
    //取的jquery对象第一个元素
    var item1 = $('.item:first');
    console.log(item1);
    //取的jquery对象最后一个元素
    var item2 = $('.item:last');
    console.log(item2);
    // var items = $('.item');
    // console.log(items[items.length - 1]);
    var item3 = $('.item:eq(2)');;
    console.log(item3);

    var odd = $('.item:odd');
    console.log(odd);
    var even = $('.item:even');
    console.log(even);
</script>

</html>